function Projectile(initTime, initVelocity, initX, initY){
	this.startTime = initTime;
	this.endTime = initTime + (2.0*initVelocity)/9.81;
	this.startVelocity = initVelocity;
	this.x = initX;
	this.y = initY;
	this.initX = initX;
	this.initY = initY;
	this.released = false;
}

Projectile.prototype.getYPosition = function(t){
	if(t > this.endTime)
		this.released = true;
	if(t < this.startTime || t > this.endTime){
		this.y = this.initY;
		return this.y;
	}
	var g = 9.81;
	var curT = t - this.startTime;
	this.y = -0.5*g*curT*curT+this.startVelocity*curT+this.initY;
	return this.y;
};